From 70dc1f53fb5add46020ddb8ea84e6ec63a66001e Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 19 Sep 2011 23:25:13 +0000 Subject: [PATCH] Back-compat for $wgProfiler set as a class. Fix for r89206 --- includes/profiler/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 1fc7b0e639..bb6ab13025 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -13,7 +13,7 @@ */ function wfProfileIn( $functionname ) { global $wgProfiler; - if ( isset( $wgProfiler['class'] ) ) { + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { Profiler::instance()->profileIn( $functionname ); } } @@ -24,7 +24,7 @@ function wfProfileIn( $functionname ) { */ function wfProfileOut( $functionname = 'missing' ) { global $wgProfiler; - if ( isset( $wgProfiler['class'] ) ) { + if ( $wgProfiler instanceof Profiler || isset( $wgProfiler['class'] ) ) { Profiler::instance()->profileOut( $functionname ); } } -- 2.20.1